/**
 * CC_Model_SearchResults.java
 */
package commands.controller;
import dataTypes.*;
import java.util.*;

/**
 * A command returning results of a file search in shared files. 
 * @author Michal Kolodziejski
 */
public class CC_Model_SearchResults extends ControllerCommand {
	/** A map of search results.
	 * File represents a shared file matching search criteria.
	 * Float number is a hit ratio and describes a level of the match (from 0 to 1).   
	 */
	private Map<File, Float> results;
	
	/** Search ID */
	private int searchID;
	
	/**
	 * Constructor.
	 * @param results a map of search results
	 */
	public CC_Model_SearchResults(Map<File, Float> results, int searchID){
		super(ControllerCommandType.MODEL_SEARCH_RESULTS);
		this.results = results;
		this.searchID = searchID;
	}

	/**
	 * 
	 * @return searchID
	 */
	public int getSearchID()
	{
		return searchID;
	}

	/**
	 * @return the map of search results.
	 * File represents a shared file matching search criteria.
	 * Float number is a hit ratio and describes a level of the match (from 0 to 1).  
	 */
	public Map<File, Float> getResults() {
		return results;
	}
	
}
